package com.bsoft.gol.hcs.satisfaction.entity;

import javax.persistence.*;
import java.util.Date;
import java.util.Objects;

/**
 * @author tongtp
 * @version v0.1
 * @Package satisfaction.entity
 * @className SatisfactionProduceRecord
 * @description
 * @create 2020-09-12 16:59
 **/
@Entity
@Table(name = "satisfaction_produce_record")
public class SatisfactionProduceRecord {
	private Long satisfactionProduceRecordId;
	private String patientSurveyId;
	private String businessType;
	private String businessId;
	private Long routeId;
	private Long routeDetailId;
	private String creatorId;
	private Date gmtCreate;

	@Id
	@Column(name = "satisfaction_produce_record_id")
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	public Long getSatisfactionProduceRecordId() {
		return satisfactionProduceRecordId;
	}

	public void setSatisfactionProduceRecordId(Long satisfactionProduceRecordId) {
		this.satisfactionProduceRecordId = satisfactionProduceRecordId;
	}

	@Basic
	@Column(name = "patient_survey_id")
	public String getPatientSurveyId() {
		return patientSurveyId;
	}

	public void setPatientSurveyId(String patientSurveyId) {
		this.patientSurveyId = patientSurveyId;
	}

	@Basic
	@Column(name = "business_type")
	public String getBusinessType() {
		return businessType;
	}

	public void setBusinessType(String businessType) {
		this.businessType = businessType;
	}

	@Basic
	@Column(name = "business_id")
	public String getBusinessId() {
		return businessId;
	}

	public void setBusinessId(String businessId) {
		this.businessId = businessId;
	}

	@Basic
	@Column(name = "route_id")
	public Long getRouteId() {
		return routeId;
	}

	public void setRouteId(Long surveyRuleId) {
		this.routeId = surveyRuleId;
	}

	@Basic
	@Column(name = "route_detail_id")
	public Long getRouteDetailId() {
		return routeDetailId;
	}

	public void setRouteDetailId(Long rulePlanId) {
		this.routeDetailId = rulePlanId;
	}

	@Basic
	@Column(name = "creator_id")
	public String getCreatorId() {
		return creatorId;
	}

	public void setCreatorId(String creatorId) {
		this.creatorId = creatorId;
	}

	@Basic
	@Column(name = "gmt_create")
	public Date getGmtCreate() {
		return gmtCreate;
	}

	public void setGmtCreate(Date gmtCreate) {
		this.gmtCreate = gmtCreate;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) {
            return true;
        }
		if (o == null || getClass() != o.getClass()) {
            return false;
        }
		SatisfactionProduceRecord that = (SatisfactionProduceRecord) o;
		return satisfactionProduceRecordId == that.satisfactionProduceRecordId &&
				routeId == that.routeId &&
				routeDetailId == that.routeDetailId &&
				Objects.equals(patientSurveyId, that.patientSurveyId) &&
				Objects.equals(businessType, that.businessType) &&
				Objects.equals(businessId, that.businessId) &&
				Objects.equals(creatorId, that.creatorId) &&
				Objects.equals(gmtCreate, that.gmtCreate);
	}

	@Override
	public int hashCode() {
		return Objects.hash(satisfactionProduceRecordId, patientSurveyId, businessType, businessId, routeId,
				routeDetailId, creatorId, gmtCreate);
	}
}
